package structures;

import java.util.*;               

// This class models a photo with an id and a list of keywords

public class Photo {

	private String id;
	private ArrayList<String> keywords;
	
	public Photo () {
		id = "";
		keywords = new ArrayList<String>();
	}
	
	public void addKeyword (String k) {
		keywords.add(k);
	}

	public void setId (String i) {
		id = i;
	}

	public String getId () {
		return id;
	}
	
	public String toString() {
		String res = "ID: " + id + "\n";
		for(Iterator iterator = keywords.iterator(); iterator.hasNext();) {
		    res = res + "\t Keyword: " + (String)iterator.next() + "\n";
		}
		return res;
	}
	
}	

